<template>
  <span class="wrapper-icon-text" :style="{ 'justify-content': align, 'color': color }">
    <el-icon :size="size">
      <component :is="icon"></component>
    </el-icon>
    <span :style="{ 'font-size': size + 'px' }">{{ text }}</span>
  </span>
</template>

<script>
import { defineComponent } from 'vue'
export default defineComponent({
  name: 'IconTextCom',
  props: {
    size: { type: String, default: '16' },
    align: { type: String, default: 'left' },
    color: { type: String, default: '#000000' },
    icon: { type: String, default: 'InfoFilled' },
    text: { type: String, default: '' },
  },
  setup() {},
})
</script>

<style lang="scss" scoped>
.wrapper-icon-text {
  display: flex;
  // justify-content: center;
  align-items: center;
  span {
    margin-left: 3px;
  }
}
</style>
